return {
    'Civitasv/cmake-tools.nvim',
    ft = {'c', 'cpp', 'cmake', 'rust', 'zig'},
    config = function(_, opts)
        require('cmake-tools').setup(opts)

        -- 添加一个针对当前文件的调试映射
        vim.api.nvim_create_autocmd({ 'FileType' }, {
            pattern = { 'cpp', 'c' },
            callback = function()
                local km = vim.keymap
                km.set('n', '<leader><f5>', '<cmd>CMakeDebug<cr>', { desc = 'cmake 调试当前文件' })
                km.set('n', '<leader><leader><f5>', '<cmd>CMakeRun<cr>', { desc = 'cmake 运行当前文件' })
                km.set('n', '<leader><f7>', '<cmd>CMakeBuild<cr>', { desc = 'cmake 构建' })
            end,
            once = true
        })
    end
}
